package com.tiancheng.trade.settlement.mapper.settlement;

import com.tiancheng.trade.settlement.mapper.TYBaseMapper;
import com.tiancheng.trade.settlement.model.settlement.OrderSourceCost;
import com.tiancheng.trade.settlement.vo.settlement.admin.res.OrderSourceResVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderSourceCostMapper extends TYBaseMapper<OrderSourceCost> {


    /**
     * 按日期查询收入成本报表
     */
    List<OrderSourceCost> getOrderSourceCost(@Param("date") String date, @Param("orderSource") String orderSource);

    /**
     * 按日期生成收入成本报表
     */
    int addOrderSourceCost(@Param("list") List<OrderSourceCost> list);

    /**
     * 按日期删除收入成本报表
     *
     * @param date
     * @return
     */
    int deleteOrderSourceCost(@Param("date") String date, @Param("orderSource") String orderSource);

    /**
     * 查询需要生成的报表信息
     */
    List<OrderSourceResVO> getOrderSourceCostList(@Param("date") String date, @Param("orderSource") String orderSource);

}
